package com.bjsxt.ego.common.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import com.bjsxt.ego.common.util.DateFormatUtil;
import com.bjsxt.ego.common.util.PageInfoUtil;

/**
 *  所有Controller的父类
 * @author 章鸿敏
 *
 */
public class BaseController
{
	@Resource
	protected DateFormatUtil dateFormatUtil;
	/*提示信息*/
	protected String info;
	
	protected PageInfoUtil processPageInfo(HttpServletRequest request)
	{
		PageInfoUtil pageInfoUtil = new PageInfoUtil();
		try
		{
			String currentPage = request.getParameter("currentPage");
			String pageSize = request.getParameter("pageSize");
			pageInfoUtil.setCurrentPage(Integer.valueOf(currentPage));
			pageInfoUtil.setPageSize(Integer.valueOf(pageSize));
		} catch (NumberFormatException e)
		{
		}
		return pageInfoUtil;
	}
}
